﻿$(function () {
    $('#category-selector a').click(function () {
        $('.selected-categories').val($('.selected-categories').val() + $(this).text() + ', ');
    });
    $('#category-extra-controls-container').hide();
    $('#category-extra-controls').click(function () {
        $('#category-extra-controls-container').toggle();
    });
    $('#add-category').click(function () {
        $('.selected-categories').val($('.selected-categories').val() + $('.new-category').val() + ', ');
    });


    $('#tag-selector a').click(function () {
        $('.selected-tags').val($('.selected-tags').val() + $(this).text() + ', ');
    });
    $('#tag-extra-controls-container').hide();
    $('#tag-extra-controls').click(function () {
        $('#tag-extra-controls-container').toggle();
    });

    $('#add-tag').click(function () {
        $('.selected-tags').val($('.selected-tags').val() + $('.new-tag').val() + ', ');
    });
});
